/**
 * Created by mengxiaxia on 2017/4/8.
 */
var app = angular.module('appDemo', ['ui.router']);
app.run(function () {
    
});
app.config(function($stateProvider,$urlRouterProvider) {
    $urlRouterProvider.when("", "/expression");
    $urlRouterProvider.otherwise('/expression');
    var states = [
        { name: 'expression', url: '/expression', component: 'expression' },
        { name: 'directive', url: '/directive', component: 'directive' },
        { name: 'model', url: '/model', component: 'model' },
        { name: 'scope', url: '/scope', component: 'scope' },
        { name: 'controller', url: '/controller', component: 'controller' },
        { name: 'filter', url: '/filter', component: 'filter' },
        { name: 'service', url: '/service', component: 'service' },
        { name: 'http', url: '/http', component: 'http' },
        { name: 'select1', url: '/select1', component: 'select1' },
        { name: 'table', url: '/table', component: 'table' },
        { name: 'htmldom', url: '/htmldom', component: 'htmldom' },
        { name: 'event', url: '/event', component: 'event' },
        { name: 'directive16', url: '/directive16', component: 'directive16' },
        { name: 'module16', url: '/module16', component: 'module16' },
        { name: 'formdemo', url: '/formdemo', component: 'formdemo' },
        { name: 'validateform', url: '/validateform', component: 'validateform' },
        { name: 'validateform2', url: '/validateform2', component: 'validateform2' },
        { name: 'api', url: '/api', component: 'api' },
        { name: 'bootstrap', url: '/bootstrap', component: 'bootstrap' },
        { name: 'include', url: '/include', component: 'include' },
        { name: 'animate', url: '/animate', component: 'animate' },
        { name: 'animate2', url: '/animate2', component: 'animate2' },
        { name: 'dependencyinjection', url: '/dependencyinjection', component: 'dependencyinjection' },
        { name: 'routing', url: '/routing', component: 'routing' },
        { name: 'routing2', url: '/routing2', component: 'routing2' }
    ]
    states.forEach(function(state) {
        $stateProvider.state(state);
    });
});
function iframeOnload(obj) {
    obj.style.height=obj.contentWindow.document.body.scrollHeight+"px";
}